package jpsearchcore;

public class Rating {
	
	private String LabelDefinition = "";
	private String LabelValue = "";

	public Rating(){}
	
	public Rating(String lblDef, String lblValue){
		LabelDefinition = lblDef;
		LabelValue = lblValue;
	}
	
	public Rating(ControlledRatingTermType crtt){
		try{
			LabelDefinition = crtt.getLabelDefinition().trim();			
		}
		catch(NullPointerException e){}
		//////
		try{
			LabelValue = crtt.getLabelValue().trim();		
		}
		catch(NullPointerException e){}	
	}
	
	public String getLabelDefinition() {
		return LabelDefinition;
	}

	public void setLabelDefinition(String labelDefinition) {
		LabelDefinition = labelDefinition;
	}

	public String getLabelValue() {
		return LabelValue;
	}

	public void setLabelValue(String labelValue) {
		LabelValue = labelValue;
	}
	
	public String toString(){
		String output = "Rating:[\n\tLabelDefinition: " + LabelDefinition;
		output += "\n\tLabelValue: " + LabelValue + "\n]";
		return output;
	}
}
